#ifndef MYDATE_H
#define MYDATE_H

#include <QObject>
#include <cmath>

class MyDate : public QObject
{
    Q_OBJECT

public:
    explicit MyDate(QObject *parent = nullptr);
    ~MyDate();
    int F(int y, int x);
//    int M(int m);
    int is_leap_year(int year);
    int get_days_in_month(int year, int month);
    void days_to_gregorian_date(int days);
//    void get_nearest_shuo_day(int day, int &a, int &b);
    void create_jie_qi_list(int year);

private:
    int days_in_month[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
    int gregorian_day = 0;
    int gregorian_month = 0;
    int gregorian_year = 0;

};

#endif // MYDATE_H
